import { Injectable } from '@angular/core';
import {HttpUtils} from "../utils/http.utils";
import {USER} from "../service/user.service";
import {ParamsModel} from "../model/params.model";
import {PageParam} from "./api.service";

@Injectable()
export class BALANCE {

  constructor(private api:HttpUtils,
              private USER: USER) {
  }

  recharge(params:any,success:any){
    let pm = new ParamsModel(this.USER);
    pm.url = '/balance/recharge';
    pm.reqestData = params;
    pm.succCallback = success;
    this.api.post(pm);
  }
  getList(succ,page?:PageParam){
    let pm = new ParamsModel(this.USER);
    pm.url = '/balance/recharge';
    pm.reqestData = page;
    pm.succCallback = succ;
    this.api.get(pm);
  }
}
